<?php
use think\facade\Route;

//token中间件注册
Route::group('api', function () {
    $apiMiddleware = [
        'ApiAuth' => \app\mall\middleware\ApiAuth::class,
    ];

    Route::rule('uc/:dir/:action', 'api.uc.:dir.:action/index', 'GET|POST')->middleware($apiMiddleware);
    Route::rule(':dir/:action', 'api.:dir.:action/index', 'GET|POST');
//    Route::rule(':action/:method', 'api.:action/:method', 'GET|POST');
//    Route::rule(':action', 'api.:action/index', 'GET|POST');
});


